<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="crm.util.ParamUtil"%>
<%@page import="crm.control.RecepitControl"%>
<%@page import="crm.model.Recepit"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
                request.setCharacterEncoding("UTF-8");
                int recepitId = ParamUtil.getInt(request,"id");
                int personId = ParamUtil.getInt(request,"person");
                System.out.print("####"+personId+"####"+recepitId);
                Recepit re = RecepitControl.getRecepitById(recepitId);
                System.out.print(re.getStage());
                if(RecepitControl.transferRecepit(recepitId,personId,Float.toString(RecepitControl.getMyHuiKuan(recepitId)))){
                	%>
                	<script>
                	alert("移交成功");
                	window.location.href="show_all_recepits.jsp";
                	</script>
                	<%
                }else{
                 	%>
                	<script>
                	alert("移交失败");
                	history.go(-1);
                	</script>
                	<%
                }
                

%>
</body>
</html>